import request from '@/utils/request'

/**
*  物料规则配置分页查询
* @param {查询条件} data
*/
export function listMaterialRuleConfig(query) {
  return request({
    url: 'production/materialruleconfig/list',
    method: 'get',
    params: query,
  })
}

/**
* 新增 物料规则配置
* @param data
*/
export function addMaterialRuleConfig(data) {
  return request({
    url: 'production/materialruleconfig',
    method: 'post',
    data: data,
  })
}
/**
* 修改 物料规则配置
* @param data
*/
export function updateMaterialRuleConfig(data) {
  return request({
    url: 'production/materialruleconfig',
    method: 'PUT',
    data: data,
  })
}
/**
* 获取 物料规则配置详情
* @param {Id}
*/
export function getMaterialRuleConfig(id) {
  return request({
    url: 'production/materialruleconfig/' + id,
    method: 'get'
  })
}

/**
* 删除 物料规则配置
* @param {主键} pid
*/
export function delMaterialRuleConfig(pid) {
  return request({
    url: 'production/materialruleconfig/delete/' + pid,
    method: 'delete'
  })
}
